<template>
	<!-- ok -->
	<view class="wanlpage-goods" :style="[pageData.style]">
		<wanl-shop :dataList="data" :dataStyle="'col-'+ pageData.params.colthree +'-'+pageData.params.colmargin" />
	</view>
</template>
<script>
	export default {
		name: "WanlPageShops",
		props: {
			pageData: {
				type: Object,
				default: function() {
					return {
						name: '店铺组件',
						type: 'shops',
						params: [],
						style: [],
						data: []
					}
				}
			}
		},
		data() {
			return {
				data: []
			};
		},
		created() {
			this.loadData()
		},
		methods: {
			async loadData() {
        this.data = this.pageData.data
        // this.data = list
        // const _that = this
				// let ids = [],
				// 	data = this.pageData.data;
				// for(let i = 0; i < data.length; i++) {
				// 	ids.push(data[i].shopLink);
				// };
				// this.$api.get({
				// 	url: '/wanlshop/page/shop',
				// 	data: {ids: ids.join(',')},
				// 	success: res => {
        //     const list = res.map((item, index) => {
        //       item.avatar = _that.$wanlshop.oss(item.avatar);
        //       item.customImg = _that.$wanlshop.oss(data[index].image)
        //       item.customName = data[index].text
        //       return item
        //     })
        //     //将data中的每个数据,赋值到list
        //
				// 		this.data = list
				// 	}
				// });
			}
		}
	}
</script>
<style>
</style>
